<div class="info-center">
    <div class="contain">

        <div class="clearfix"></div>

        <div class="table-margin">

            <div class="table-header">
                <table class="table table-bordered table-header">
                    <thead>
                        <tr>
                            <td class="max-w w5 text-center">
                                <input type="checkbox" #event (click)="_selectAll(event.checked, tabVal)" [checked]="isSelectAll">
                            </td>
                            <td class="max-w w5 text-center">序号</td>
                            <td class="max-w w10 text-left">应用缩略图</td>
                            <td class="max-w w10 text-left">应用名称</td>
                            <td class="max-w w10 text-left">应用URL</td>
                            <td class="max-w w10 text-left">授权范围</td>
                            <td class="max-w w10 text-left">应用类型</td>
                            <td class="max-w w10 text-left">创建时间</td>
                            <td class="max-w w5 text-left">状态</td>
                            <td class="max-w w10">操作</td>
                        </tr>
                    </thead>
                </table>
            </div>

            <div class="table-body">
                <table class="table table-bordered table-header overflow-table">
                    <tbody class="no-border">
                        <tr *ngFor="let tabval of tabVal; let i = index;" [ngClass]="{'active':i%2!=0}">

                            <td class="hide">{{ tabval.appId }}</td>

                            <td class="max-w w5 text-center">
                                <input type="checkbox" #event (click)="_chose(event.checked, tabval.appId, tabVal.length)" [checked]="isChose">
                            </td>
                            <td class="max-w w5 text-center">{{ naturalNum+i+1 }}</td>
                            <td class="w10 text-left">
                                <img [src]="tabval.appImage" style="width:50px;">
                            </td>
                            <td class="max-w w10 text-left cursor" [title]="tabval.appName">{{ tabval.appName }}</td>
                            <td class="max-w w10 text-left cursor" [title]="tabval.appUri">{{ tabval.appUri }}</td>
                            <td class="max-w w10 text-left cursor" [title]="tabval.scope">{{ tabval.scope }}</td>
                            <td class="max-w w10 text-left">
                                <span *ngIf="tabval.appType==0">普通应用</span>
                                <span *ngIf="tabval.appType==1">内部站点</span>
                            </td>
                            <td class="max-w w10 text-left">
                                {{ tabval.createDate | date: "yyyy-MM-dd" }}
                            </td>
                            <td class="max-w w5 text-left">
                                <strong class="text-warning" *ngIf="tabval.status==0">待审核</strong>
                                <strong class="text-success" *ngIf="tabval.status==1">正常</strong>
                                <strong class="text-danger" *ngIf="tabval.status==2">冻结</strong>
                                <strong class="text-danger" *ngIf="tabval.status==3">逻辑删除</strong>
                                <strong class="text-danger" *ngIf="tabval.status==4">不合格</strong>
                            </td>
                            <td class="max-w w10 text-left">
                                <span class="btn-i" 
                                      title="详情" 
                                      data-toggle="modal" 
                                      data-target="#details" 
                                      *ngIf="right['application']['details']"
                                      (click)="details._details(tabval.appId)" 
                                      >
                                    <img width="14px" height="10px" src="assets/right-product/view.png">
                                </span>
                                <span class="btn-i" 
                                      title="修改" 
                                      data-toggle="modal"
                                      data-target="#edit" 
                                      *ngIf="right['application']['update']"
                                      (click)="edit._details(tabval.appId);initService._init(1)" 
                                      >
                                    <img width="14px" height="14px" src="assets/right-product/edit.png">
                                </span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

        </div>

    </div>
</div>

<!-- 详情 BEGIN -->
    <application-details #details></application-details>
<!-- 详情 END -->

<!-- 修改 BEGIN -->
    <application-edit #edit (onSubmit)="_table()"></application-edit>
<!-- 修改 BEGIN -->